/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-12-10     xu       the first version
 */
#ifndef APPLICATIONS_UI_TASK_H_
#define APPLICATIONS_UI_TASK_H_

#include <rtthread.h>

struct ui_task {
    rt_bool_t drawing;
    rt_bool_t running;
    const char* name;
    rt_mq_t mq;
    rt_sem_t ready;
    rt_sem_t finish;
    rt_thread_t thread;
};

typedef struct ui_task* ui_task_t;

ui_task_t ui_task_create();

rt_bool_t ui_task_start(ui_task_t context);

rt_bool_t ui_task_stop(ui_task_t context);

rt_bool_t ui_task_destroy(ui_task_t context);

rt_bool_t ui_draw_month_view(ui_task_t context);

rt_bool_t ui_draw_daily_view(ui_task_t context);

rt_bool_t ui_task_control(ui_task_t context, rt_uint8_t cmd);

#endif /* APPLICATIONS_UI_TASK_H_ */
